//
//  CSGXCommodityPickerBLL.h
//  CarSalesMS_GCX
//
//  Created by Ssky on 2016/12/20.
//  Copyright © 2016年 Tony. All rights reserved.
//

#import <Foundation/Foundation.h>

#import "TCommodityInfoModel.h"
#import "TInventoryModel.h"

typedef enum {
    InventoryCheckTypeNone = 0, //未盘点
    InventoryCheckTypeGain, //盘盈
    InventoryCheckTypeLoss, //盘亏
    InventoryCheckTypeLevel, //盘平
    
} InventoryCheckType;

@interface CSGXCommodityPickerBLL : NSObject

+ (TInventoryModel *)loadInventoryModelWithCommCategory:(NSString *)category;

+ (TInventoryModel *)loadInventoryModelWithCommNo:(NSString *)commNo;

///修改库存数量
+ (NSString *)modifyCountWithCountStr:(NSString *)originCountStr index:(NSInteger)index count:(NSInteger)count;

///得到盘点状态 盘盈、盘亏、盘平、未盘
+ (InventoryCheckType)getInventoryTypeWithCountStr:(NSString *)countStr originCountStr:(NSString *)originCountStr commNo:(NSString *)commNo;
+ (InventoryCheckType)getInventoryTypeWithCountStr:(NSString *)countStr commNo:(NSString *)commNo;

///取得所有库存，分类是否盘点和未盘点，返回总和。
+ (NSArray<TInventoryModel *> *)getCheckTypeInventoryList:(NSArray<TInventoryModel *> *)inventoryCheckedList;

///取得所有已经盘点过的数据（从checkPreviewVc点击编辑返回checkVc时调用）
+ (NSArray<TInventoryModel *> *)getCheckedYesInventoryList:(NSArray<TInventoryModel *> *)inventoryCheckedList;






#pragma mark - update
+ (void)updateInventoryWithList:(NSArray<TInventoryModel *> *)inventoryList;




@end
